<template>
	<div class="system-edit-dept-container">
		<el-dialog
			v-model="isShowDialog"
			:title="'充值记录'"
			width="769px"
		>
			<div ref="shopRef">
				<Shop ref="shopLogRef" :shop_id="shop_id"/>
			</div>
			
			<template #footer>
			<div class="dialog-footer">
				<el-button @click="isShowDialog = false">关闭</el-button>
			</div>
			</template>
		</el-dialog>
	</div>
</template>

<script lang="ts">
import {reactive, toRefs, defineComponent, getCurrentInstance,ref,unref} from 'vue';
import Shop from '/@/views/zmm/money_log/Shop.vue';

import {ElMessage} from "element-plus";
import { stat } from 'fs';

interface PageSate {
	isShowDialog: boolean;
	shop_id:number;
}

export default defineComponent({
	name: 'zmmShopMoneyLog',
	components: {  Shop },

	setup(prop,{emit}) {
    const {proxy} = getCurrentInstance() as any;
	const shopLogRef = ref();
    const shopRef = ref<HTMLElement | null>(null);
		const state = reactive<PageSate>({
			isShowDialog: false,
			shop_id:0,
		});
		// 打开弹窗
		const openDialog = (id:number=0) => {
			state.isShowDialog = true;
			state.shop_id = id;
			if(shopLogRef.value){
				shopLogRef.value.changeShopId(id)
			}
			// console.log("aabbcc",memberLogRef.value)
			// memberLogRef.value.initTableData(id)
		};
		

		return {
			openDialog,
			shopRef,
			shopLogRef,
			...toRefs(state),
		};
	},
});
</script>
